/**
 * class  BaseSkin
 * 组件皮肤基类，此类定义了不同组件的样式表
 * author haicent
 * email haicent@126.com
 * version 0.01
 */
package as3.component.support
{
	public class BaseSkin
	{
		public function BaseSkin()
		{
		}
		
		protected var _btnCssTable:Object = {};
		
		protected var _linkBtnCssTable:Object = {};
		
		protected var _checkBoxCssTable:Object = {};
		
		protected var _radioCssTable:Object = {};
		
		protected var _textInputCssTable:Object = {};
		
		protected var _toggleBtnCssTable:Object = {};
		
		protected var _tabBtnCssTabel:Object = {};
		
		protected var _cellRendererTabel:Object = {};
		
		protected var _comboBoxTabel:Object = {};
		
		protected var _panelTabel:Object = {};
		
		protected var _treeTabel:Object = {};
		
		public function get linkBtnCssTable():Object
		{
			return _linkBtnCssTable;
		}
		
		public function get btnCssTable():Object
		{
			return _btnCssTable;
		}
		
		public function get checkBoxCssTable():Object
		{
			return _checkBoxCssTable;
		}
		
		public function get radioCssTable():Object
		{
			return _radioCssTable;
		}
		
		public function get textInputCssTable():Object
		{
			return _textInputCssTable;
		}
		
		public function get toggleBtnCssTable():Object
		{
			return _toggleBtnCssTable;
		}
		
		public function get tabBtnCssTabel():Object
		{
			return _tabBtnCssTabel;
		}
		
		public function get cellRendererTabel():Object
		{
			return _cellRendererTabel;
		}
		
		public function get comboBoxTabel():Object
		{
			return _comboBoxTabel;
		}
		
		public function get panelTabel():Object
		{
			return _panelTabel;
		}
		
		public function get treeTabel():Object
		{
			return _treeTabel;
		}
		
		/**
		 *根据名称查找皮肤类 
		 * @param name
		 * @return 
		 * 
		 */		
		public function getUIClassByName(name:String):Class
		{
			if (name == null || name == "") return null;
			if (hasOwnProperty(name)) return this[name];
			else return null;
		}
		
		/**
		 * 根据资源名直接获取资源实例
		 * @param name
		 * @return 
		 * 
		 */		
		public function getUIByName(name:String):*
		{
			var res:Class = getUIClassByName(name);
			return new res();
		}
	}
}